<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件的切换</title>
    <style>
        #div{
            border: 1px solid black;
        }
    </style>
</head>
<body>
    <div id="div">我是div</div>
</body>
<script src="js/jquery-3.3.1.min.js"></script>
<script>
    //方式一 单独定义
$("#div").mouseover(function () {
    //console.log("鼠标移入");
    this.style.background="green";
})
    $("#div").mouseover(function () {
        //console.log("鼠标移出");
        this.style.backgroundColor="white";
    })


    //方式二 链式定义

</script>
</html>